Cách kiếm tiền đơn giản, hiệu quả nhất

Hiển thị các bài đăng có nhãn share document. Hiển thị tất cả bài đăng
Hiển thị các bài đăng có nhãn share document. Hiển thị tất cả bài đăng

Thứ Bảy, 31 tháng 10, 2015

Using android Camera surfaceView android studio

|0 nhận xét

1. Create a New Android Application Project
2. Creating the layout of the main 
We are going to make a very simple layout xml for the CameraDemo

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <RelativeLayout
        android:id="@+id/btn_layout"
        android:layout_width="match_parent"
        android:layout_height="match_parent">

        <RelativeLayout
            android:id="@+id/layout_area"
            android:layout_width="match_parent"
            android:layout_height="50dp"
            android:layout_alignParentTop="true"
            android:background="#000">

            <ImageView
                android:id="@+id/btn_flash"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_alignParentLeft="true"
                android:padding="5dp"
                android:src="@drawable/ic_action_flash_off" />

            <ImageView
                android:id="@+id/btn_switch"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_alignParentRight="true"
                android:padding="5dp"
                android:src="@drawable/ic_action_switch_camera" />

        </RelativeLayout>

        <SurfaceView
            android:id="@+id/surfaceView"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_above="@+id/layout_area1"
            android:layout_below="@+id/layout_area" />

        <RelativeLayout
            android:id="@+id/layout_area1"
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:layout_alignParentBottom="true"
            android:background="#000">

            <ImageView
                android:id="@+id/btn_exit"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_alignParentLeft="true"
                android:layout_centerVertical="true"
                android:src="@drawable/ic_action_remove" />

            <com.melnykov.fab.FloatingActionButton
                android:id="@+id/btn_take_photo"
                android:layout_width="60dp"
                android:layout_height="60dp"
                android:layout_centerInParent="true"
                android:src="@drawable/ic_action_camera" />

            <ImageView
                android:id="@+id/btn_lib"
                android:layout_width="50dp"
                android:layout_height="50dp"
                android:layout_alignParentRight="true"
                android:layout_centerVertical="true"
                android:layout_margin="5dp"
                android:src="@drawable/ic_library_cam" />
        </RelativeLayout>
    </RelativeLayout>
</FrameLayout>
3. Creating the source code
package com.example.tb_laota.camerademo;

import android.content.Intent;
import android.hardware.Camera;
import android.hardware.Camera.PictureCallback;
import android.hardware.Camera.ShutterCallback;
import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.support.v7.app.AppCompatActivity;
import android.view.SurfaceHolder;
import android.view.SurfaceView;
import android.view.View;
import android.widget.Toast;

import com.melnykov.fab.FloatingActionButton;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.Date;

import butterknife.ButterKnife;
import butterknife.InjectView;

/**
 * Created by tb_laota on 10/30/2015.
 */
public class CameraActivity extends AppCompatActivity implements SurfaceHolder.Callback {
    Camera camera;
    @InjectView(R.id.surfaceView)
    SurfaceView surfaceView;
    @InjectView(R.id.btn_take_photo)
    FloatingActionButton btn_take_photo;
    SurfaceHolder surfaceHolder;
    PictureCallback jpegCallback;
    ShutterCallback shutterCallback;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.camera_activity);
        ButterKnife.inject(this);
        surfaceHolder = surfaceView.getHolder();
        // Install a surfaceHolder.Callback so we get notified when the
        // underlying surface is created and destroyed.
        surfaceHolder.addCallback(this);
        //deprecated setting, but required on android versions prior to 3.0
        surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);
        btn_take_photo.setOnClickListener(new FloatingActionButton.OnClickListener() {
            @Override
            public void onClick(View v) {
                captureImage();
            }
        });

        jpegCallback = new PictureCallback() {
            @Override
            public void onPictureTaken(byte[] data, Camera camera) {
                FileOutputStream outputStream = null;
                File file_image = getDirc();
                if (!file_image.exists() && !file_image.mkdirs()) {
                    Toast.makeText(getApplication(), "Can't create directory to save image", Toast.LENGTH_SHORT).show();
                    return;
                }
                SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyymmddhhmmss");
                String date = simpleDateFormat.format(new Date());
                String photofile = "Cam_Demo" + date + ".jpg";
                String file_name = file_image.getPath() + File.separator + photofile;
                File picfile = new File(file_name);
                try {
                    outputStream = new FileOutputStream(picfile);
                    outputStream.write(data);
                    outputStream.close();
                } catch (FileNotFoundException e) {
                } catch (IOException ex) {
                } finally {

                }
                Toast.makeText(getApplicationContext(), "Picture saved", Toast.LENGTH_SHORT).show();
                refreshCamera();
                refreshGallery(picfile);
            }
        };
    }

    //refresh gallery
    public void refreshGallery(File file) {
        Intent intent = new Intent(Intent.ACTION_MEDIA_SCANNER_SCAN_FILE);
        intent.setData(Uri.fromFile(file));
        sendBroadcast(intent);
    }

    public void refreshCamera() {
        if (surfaceHolder.getSurface() == null) {
            //preview surface does not exist
            return;
        }
        //stop preview before making changes
        try {
            camera.stopPreview();
        } catch (Exception e) {
        }
        //set preview size and make any resize, rotate or
        //reformatting changes here
        //start preview with new settings
        try {
            camera.setPreviewDisplay(surfaceHolder);
            camera.startPreview();
        } catch (Exception e) {
        }
    }

    public File getDirc() {
        File dics = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DCIM);
        return new File(dics, "Camera_Demo");
    }

    public void captureImage() {
        //take the picture
        camera.takePicture(null, null, jpegCallback);
    }

    @Override
    public void surfaceCreated(SurfaceHolder holder) {
        //open the camera
        try {
            camera = Camera.open();
        } catch (RuntimeException ex) {
        }
        Camera.Parameters parameters;
        parameters = camera.getParameters();
        //modify parameter
        parameters.setPreviewFrameRate(20);
        parameters.setPreviewSize(352, 288);
        camera.setParameters(parameters);
        camera.setDisplayOrientation(90);
        try {
            //The surface thas been created, now tell the camera where to draw
            //the preview
            camera.setPreviewDisplay(surfaceHolder);
            camera.startPreview();
        } catch (Exception e) {
        }
    }

    @Override
    public void surfaceChanged(SurfaceHolder holder, int format, int width, int height) {
        refreshCamera();
    }

    @Override
    public void surfaceDestroyed(SurfaceHolder holder) {
//stop preview and release camera
        camera.stopPreview();
        camera.release();
        camera = null;
    }
}
In these lines, we find our SurfaceView from our main layout and we get a holder, an abstract interface to someone holding a display surface. This, allows us to control the surface size and format, edit the pixels in the surface, and monitor changes to the surface. We also install a SurfaceHolder.Callback so we get notified when the underlying surface is created and destroyed. We have also written the surfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS); deprecated setting, but required on Android versions prior to 3.0.

4. Android Manifest
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.tb_laota.camerademo">

    <uses-permission android:name="android.permission.CAMERA" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <uses-feature android:name="android.hardware.camera" />
    <uses-feature android:name="android.hardware.camera.autofocus" />

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".MainActivity"
            android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />

                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
        <activity android:name=".CameraActivity"></activity>
    </application>

</manifest>

5. Build, compile and run


Chủ Nhật, 9 tháng 8, 2015

[Share] Ứng dụng học tiếng anh trên android đơn giản, dễ học

|0 nhận xét
Hiện nay, tiếng Anh được coi là ngôn ngữ quốc tế số một trên thế giới. Hàng triệu người từ các nền văn hóa khác nhau đều nỗ lực học tiếng Anh mỗi ngày. 

Ở Việt Nam, tiếng Anh cũng đã chiếm được vị trí quan trọng kể từ khi đất nước bắt đầu thực hiện chính sách mở cửa hội nhập ra khu vực và thế giới. Ở nhiều lĩnh vực khác nhau trong xã hội như kinh tế, chính trị, khoa học, du lịch, vv... đều rất cần những người có trình độ tiếng Anh giỏi. Người ta học và sử dụng tiếng Anh với nhiều mục đích khác nhau để đáp ứng nhu cầu giao tiếp ngày càng lớn trong xã hội, để kiếm được công việc tốt, để được thăng chức, hay để giành được cơ hội đi du học và làm việc ở nước ngoài. 
Trước những đặc điểm đó, mình xin giới thiệu với các bạn ứng dụng học tiếng anh trên điện thoại di động sử dụng hệ điều hành android.

Ứng dụng của mình có một số chức năng chính như sau:
-   Học từ vưng tiếng anh:
+ tổng hợp 3000 từ vựng thông dụng.
+ Từ vựng theo hình ảnh:Các loài động vât, thực vật, thức ăn đồ uống, phương tiện ,công việc, cơ thể người...
+ Từ vựng theo chủ đề:Tình yêu hôn nhân, các môn thể thao, thời tiết, các loại trái cây...
+ Từ vựng theo chuyên ngành:công nghệ thông tin, kinh tế,tài chính,kế toán...
- Học ngữ pháp tiếng anh
- Luyện nghe tiếng anh giao tiếp.
- Những cụm từ tiếng anh thông dụng trong giao tiếp.





Nội dung:
- Là một ứng dụng gọn nhẹ giúp người dùng có thể học ở mọi lúc mọi nơi một cách hiệu quả, học một mình hay học theo nhóm bạn bè.
- Người dùng có thể tra cứu những từ mới một cách dễ dàng.

- Xem các video hướng dẫn học tiếng anh khi có kết nối mạng.
Ứng dụng học tiếng anh cơ bản english study là một ứng dụng tuyệt vời giúp ích rất nhiều cho việc học tiếng anh của bạn.Ứng dụng được thiết kế để bạn dễ dàng học tập và củng cố kiến thức tiếng anh hạn hẹp.
Link cài đặt: English_study

Thứ Hai, 29 tháng 6, 2015

Share ebook học lập trình C từ cơ bản đến nâng cao cực hay

|0 nhận xét
Share ebook học lập trình C từ cơ bản đến nâng cao cực hay
Mô tả:
-Title The C Programming Language, 2nd Edition
-Author(s) Brian W. Kernighan, Dennis M. Ritchie
-Publisher: Prentice Hall PTR; 2 edition (April 1, 1988)
-Paperback 274 pages
-eBook PDF, 270 pages, 1.1 MB
-Language: English
Book Description
Just about every C programmer I respect learned C from this book. Unlike many of the 1,000 page doorstops stuffed with CD-ROMs that have become popular, this volume is concise and powerful (if somewhat dangerous) - like C itself. And it was written by Kernighan himself. Need we say more?
This book presents a complete guide to ANSI standard C language programming. Written by the developers of C, this new version helps readers keep up with the finalized ANSI standard for C while showing how to take advantage of C's rich set of operators, economy of expression, improved control flow, and data structures.
This 2nd edition has been completely rewritten with additional examples and problem sets to clarify the implementation of difficult language constructs.
About the Authors
  • Brian W. Kernighan works in the Computing Science Research Center at Bell Laboratories, Lucent Technologies. He is Consulting Editor for Addison-Wesley's Professional Computing Series and the author, with Dennis Ritchie, of The C Programming Language.
  • Dennis M. Ritchie was best known as the creator of the C programming language, a key developer of the Unix operating system. He was also notable for his influence on ALTRAN, B, BCPL, Multics, etc.
Hướng dẫn download tài liệu:
-Click vào đường dẫn download.
-Chờ khoảng 5s sau đỏ click vào SKIP THIS AD phía trên cùng bên phải .

Chủ Nhật, 28 tháng 6, 2015

Share bộ tài liệu khủng về lập trình android mới nhất 2015

|0 nhận xét
Kho tài liệu lập trình android đầy đủ phiên bản Tiếng Anh dành cho bạn nào muốn tìm hiểu về lập trình android. Bộ tài liệu này bao gồm tài liệu cơ bản, nâng cao, lập trình game android.

Nội dung của kho tài liệu
Kho tài liệu này bao gồm 3 phần: cơ bản, nâng cao, lập trình game android.

Phần cơ bản
Trích dẫn
- Tài liệu tiếng việt cơ bản
- Giáo trình giảng dạy android và bài tập
- Đều cần thiết trong lập trình android
- Bắt đầu học lập trình với android (Apress)
- Phát triển Web trên SmartPhone
- Tiết lộ bí quyết trong lập trình Android
- Xin chào Android 1 (2008)
- Xin chào Android 2 (2009)
- Xây dựng ứng dụng với thư viện Android SDK
- Bắt đầu phát triển ứng dụng trên android
- Action trong Android
- Học lập trình Android (2011)
- Hướng dẫn phát triển ứng dụng 1 (2011)
- Hướng dẫn phát triển ứng dụng 2 (2011)
- Công việc trong Android
- Hướng dẫn xử lý SQLite
- Phát triển ứng dụng android với Adobe
- Flash Mobile cho Android và iOS
- Hướng dẫn xử lý code trong lập trình Android
- Bắt đầu phát triển ứng dụng Android
- Xây dựng ứng dụng android với HTML CSS và JavaScript
- Bước đầu phát triển ứng dụng Android
- Bắt đầu học lập trình Android 2012
- Android Pro
- Lập trình Android phiên bản 2


Phần nâng cao
Trích dẫn

- WebService trên Android
- Phát triển ứng dụng android chuyên nghiệp
- Lập trình Android Pro 2 (Apress)
- Hướng dẫn làm luận án Android Google
- Xử lý Media (đồ họa, âm thanh, video) pro trong Android
- Phát triển ứng dụng ngụy trang trong android
- Phát triển ứng dụng kết nối không dây
- Dự án thực tế trong Android
- Phát triển giao diện người dùng trong Android
- Phát triển ứng dụng android Dummies
- Action trong Android Phiên Bản 3 (2011)
- Nền tảng bảo mật ứng dụng trong Android
- Tối ưu hóa hiệu xuất phát triển ứng dụng Pro
- Pro OpenGL ES cho Android
- Thiết kế và phát triển cơ bản giao diện người dùng
- Phát triển ứng dụng Android chuyên nghiệp


Phần lập trình game android
Trích dẫn
- Bắt đầu học lập trình game Android
- Bắt đầu làm game trên Android
- Làm game thời gian thực trong Android
- Lập trình game android pro
- Phát triển game thực tế
- Làm Game và giao diện trên Android iOS với OpenGL ES 2.0
- Nâng cao kỹ năng lập trình game trên Android
- Hướng dẫn xây dựng hoàn thành một game Android


Ai nên đọc tài liệu này?
Tất cả những ai quan tâm, muốn tìm hiểu về lập trình android, lập trình ứng dụng trên Android, lập trình game android.


Hướng dẫn download tài liệu:
-Click vào đường dẫn download.
-Chờ khoảng 5s sau đỏ click vào SKIP THIS AD phía trên cùng bên phải .

Link download : Android_Document_Full

Share tài liệu quản trị mạng Windows Server 2008

|0 nhận xét
Microsoft Windows Server 2008 là thế hệ kế tiếp của hệ điều hành Windows Server, có thể giúp các chuyên gia công nghệ thông tin có thể kiểm soát tối đa cơ sở hạ tầng của họ và cung cấp khả năng quản lý và hiệu lực chưa từng có, là sản phẩm hơn hẳn trong việc đảm bảo độ an toàn, khả năng tin cậy và môi trường máy chủ vững chắc hơn các phiên bản trước đây.

Windows Server 2008 cung cấp những giá trị mới cho các tổ chức bằng việc bảo đảm tất cả người dùng đều có thể có được những thành phần bổ sung từ các dịch vụ từ mạng. Windows Server 2008 cũng cung cấp nhiều tính năng vượt trội bên trong hệ điều hành và khả năng chuẩn đoán, cho phép các quản trị viên tăng được thời gian hỗ trợ cho các doanh nghiệp.
Windows Server 2008 được thiết kế để cung cấp cho các tổ chức có được nền tảng sản xuất tốt nhất cho ứng dụng, mạng và các dịch vụ web từ nhóm làm việc đến những trung tâm dữ liệu với tính năng động, tính năng mới có giá trị và những cải thiện mạnh mẽ cho hệ điều hành cơ bản.
Cải thiện hệ điều hành cho máy chủ Windows.Thêm vào tính năng mới, Windows Server 2008 cung cấp nhiều cải thiệm tốt hơn cho hệ điều hành cơ bản so với hệ điều hành Windows Server 2003.
Những cải thiện có thể thấy được gồm có các vấn đề về mạng, các tính năng bảo mật nâng cao, truy cập ứng dụng từ xa, quản lý role máy chủ tập trung, các công cụ kiểm tra độ tin cậy và hiệu suất, nhóm chuyển đổi dự phòng, sự triển khai và hệ thống file.

Tài liệu bao gồm những nội dung sau:


Chương 1: Giới thiệu Windows Server
Chương 2: Tổng quan về Windows Server 2008
Chương 3: Cài đặt Windows Server 2008
Chương 4: Dựng Domain
Chương 5: Xây dựng các dịch vụ
Chương 6: User – Group
Chương 7: Chính sách bảo mật
Chương 8: Quyền truy cập NTFS
Chương 9: Xây dựng mô hình Server – Client
Tài liệu rất hay và hữu ích share cho các bạn quan tâm thì tải về nke'.@@
Link download:  Windows Server 2008